<?php namespace Common\Model;
use Hdphp\Model\Model;
//商品详细表
class Detail extends Model{
//指定表名
    protected $table = "shop_detail";

//	添加货品信息
	public function store(){
	    if(!$this->create()) return FALSE;
		$this->add();
		return TRUE;
	}
	
//  添加
    public function stores($gid){
//  	p(Q("post.images"));
		$this->create();
		$this->data['images'] = implode(',', Q("post.images"));
//		p($this->data);
		$this->data['goods_aid']=$gid;
        $this->add();
//		exit;
        return TRUE;
    }
	
//	修改
	public function edits($aid){
	    $this->create();
		
		$this->data['images'] = implode(',', Q('post.images'));
//		p($this->data);
//		exit;
		$this->where("goods_aid={$aid}")->save();
		return TRUE;
	}
	
	
}